import superRequest from '@/utils/http/index'
import { IDataType } from '@/utils/http/types'

/** 配置列表(接口) */
export const apiConfigList = async (data: any) => {
  return await superRequest.post<IDataType>({
    url: '/config/list',
    data,
  })
}

/** 获取公共列表(接口) */
export const apiConfigPublicList = async () => {
  return await superRequest.get<IDataType>({
    url: '/config/publicList'
  })
}

/** 配置新增(接口) */
export const apiConfigAdd = async (data: any) => {
  return await superRequest.post<IDataType>({
    url: '/config/add',
    data,
  })
}

/** 配置修改(接口) */
export const apiConfigUpdate = async (data: any) => {
  return await superRequest.post<IDataType>({
    url: '/config/update',
    data,
  })
}

/** 配置删除(接口) */
export const apiConfigDelete = async (data: any) => {
  return await superRequest.post<IDataType>({
    url: '/config/delete',
    data,
  })
}